package com.codetci.kafka;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @Author: zhenzhong.wang
 * @Time: 2018/08/21 23:04
 */
@Component
public class KafkaConsumer {

  @KafkaListener(topics = "test")
  public void listen(ConsumerRecord<?, ?> cr) throws Exception {
    System.out.println(cr.toString());
  }
}
